﻿<Timeline Items="GetCustomerComponentTimelineItems()" />

@code {
    /// <summary>
    /// 
    /// </summary>
    private IEnumerable<TimelineItem> GetCustomerComponentTimelineItems() => new TimelineItem[]
    {
        new TimelineItem
        {
            Color = Color.Success,
            Component = DynamicComponent.CreateComponent<BootstrapBlazor.Components.Console>(new KeyValuePair<string, object>[]
            {
                new KeyValuePair<string, object>(nameof(BootstrapBlazor.Components.Console.Items), Messages)
            }),
            Description = "实时输出"
        },
        new TimelineItem
        {
            Color = Color.Info,
            Component = DynamicComponent.CreateComponent<Counter>(),
            Description = "计数器"
        },
        new TimelineItem
        {
            Color = Color.Warning,
            Component = DynamicComponent.CreateComponent<FetchData>(),
            Description = "天气预报信息"
        }
    };
}
